package com.jd.finance.core.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 贷款表
 * </p>
 *
 * @author LiQingBo
 * @since 2022-05-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Loan对象", description = "贷款表")
public class Loan implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "贷款id")
    @TableId(value = "lid", type = IdType.AUTO)
    private Integer lid;

    @ApiModelProperty(value = "贷款本金")
    private BigDecimal loanMoney;

    @ApiModelProperty(value = "定金")
    private BigDecimal deposit;

    @ApiModelProperty(value = "贷款状态0：待审核，1：待签约，2已放款,3已还清")
    private Integer loanStatus;

    @ApiModelProperty(value = "用户id")
    private Integer uid;

    @ApiModelProperty("银行信贷员id")
    private Integer loanOfficerId;

    @ApiModelProperty(value = "业务员id")
    private Integer workerId;

    @ApiModelProperty(value = "公司id")
    private Integer cid;

    @ApiModelProperty(value = "产品id")
    private Integer pid;

    @ApiModelProperty(value = "银行id")
    private Integer bid;

    @ApiModelProperty(value = "银行卡id")
    private Integer bcId;

    @ApiModelProperty(value = "一审通过时间")
    private LocalDateTime fristCheck;

    @ApiModelProperty(value = "二审通过时间")
    private LocalDateTime secondCheck;

    @ApiModelProperty(value = "逾期金额")
    private BigDecimal overdueTotal;

    @ApiModelProperty(value = "是否逾期0：否 1：是")
    @TableField("is_overdue")
    private Boolean overdue;

    @ApiModelProperty(value = "本息")
    private BigDecimal total;

    @ApiModelProperty(value = "利息")
    private BigDecimal interest;

    @ApiModelProperty(value = "手续费")
    private BigDecimal fee;

    @ApiModelProperty(value = "借款期限")
    private Integer period;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "是否删除")
    @TableField("is_deleted")
    @TableLogic
    private Boolean deleted;


}
